package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaPrincipal extends javax.swing.JFrame {

	private JPanel panContenedor;
	private JPanel jPanel1;
	private JPanel panBarra;
	private JLabel lblTituloLiga;
	private JButton btnPlayoff;
	private JButton btnEquipo;
	private JButton btnUmpire;

	/**
	* Auto-generated main method to display this JFrame
	*/
		
	public VentanaPrincipal() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setBackground(new java.awt.Color(255,255,255));
			this.setResizable(false);
			{
				panContenedor = new JPanel();
				getContentPane().add(panContenedor, BorderLayout.CENTER);
				panContenedor.setPreferredSize(new java.awt.Dimension(351, 162));
				panContenedor.setLayout(null);
				panContenedor.setBackground(new java.awt.Color(255,255,255));
				{
					btnUmpire = new JButton();
					panContenedor.add(btnUmpire);
					btnUmpire.setText("Umpires");
					btnUmpire.setBounds(45, 110, 93, 22);
					btnUmpire.setBackground(new java.awt.Color(173,216,230));
				}
				{
					btnEquipo = new JButton();
					panContenedor.add(btnEquipo);
					btnEquipo.setText("Equipos");
					btnEquipo.setBounds(248, 110, 93, 22);
					btnEquipo.setBackground(new java.awt.Color(173,216,230));
				}
				{
					btnPlayoff = new JButton();
					panContenedor.add(btnPlayoff);
					btnPlayoff.setText("Playoff");
					btnPlayoff.setBounds(148, 174, 90, 22);
					btnPlayoff.setBackground(new java.awt.Color(173,216,230));
				}
				{
					lblTituloLiga = new JLabel();
					panContenedor.add(lblTituloLiga);
					lblTituloLiga.setText("Liga de Beisbol Profesional");
					lblTituloLiga.setBounds(96, 40, 210, 25);
					lblTituloLiga.setFont(new java.awt.Font("Dialog",1,14));
				}
				{
					panBarra = new JPanel();
					panContenedor.add(panBarra);
					panBarra.setLayout(null);
					panBarra.setBounds(-15, 43, 426, 21);
					panBarra.setBackground(new java.awt.Color(185,231,246));
				}
				{
					jPanel1 = new JPanel();
					panContenedor.add(jPanel1);
					jPanel1.setLayout(null);
					jPanel1.setBounds(-9, 64, 420, 10);
					jPanel1.setBackground(new java.awt.Color(30,144,255));
				}
			}
			pack();
			setSize(400, 300);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}	

	public JButton getBtnPlayoff() {
		return btnPlayoff;
	}

	public void agregarListener(ActionListener accion){
		btnUmpire.addActionListener(accion);
		btnEquipo.addActionListener(accion);
		btnPlayoff.addActionListener(accion);
	}
	
	public void mostrarMensaje(String mensaje){
		JOptionPane.showMessageDialog(this, mensaje);
	}
}
